function test (){
    var inp = parseFloat(document.getElementById('inp').value);        
    var s = 3.14 * (inp * inp);
    alert('面积为：' + s)
    console.log(alert)
}